package com.woniuxy.oa.rms.login.listener;

import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

import com.woniuxy.oa.rms.login.utils.SessionContext;

public class RightListener implements HttpSessionListener {
	
	public static SessionContext sessionContext = SessionContext.getInstance();

	public void sessionCreated(HttpSessionEvent httpSessionEvent) {
		sessionContext.AddSession(httpSessionEvent.getSession());
		System.out.println(httpSessionEvent.getSession()+"创建了");
	}

	public void sessionDestroyed(HttpSessionEvent httpSessionEvent) {
		sessionContext.DelSession(httpSessionEvent.getSession());
		System.out.println(httpSessionEvent.getSession()+"摧毁了");
	}
}
